设备管理API
获取设备列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
| residence_id | String | Body | 是 | 住宅ID |
| sub_device_type | []String | Body | 否 | 子设备类型 |
| show_ability | Boolean | Body | 否 | 判断是否展示设备能力 true:展示 false:隐藏 |
| parallel_sub_device | Boolean | Body | 否 | 判断是否展开子设备信息 true:展开 false:嵌套 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| product_name | String | Body | 产品名称 |
| device_type | String | Body | 设备类型 |
| device_picture_url | String | Body | 设备图片地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| abilities | []Object<ability> | Body | 能力信息 |
| space | Object<space> | Body | 空间信息 |
| sub_devices | []Object<result> | Body | 子设备信息 |
| parent_device_id | String | Body | 父设备ID |
ability说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| ability_id | String | Body | 能力ID |
| ability_name | String | Body | 能力名称 |
| ability_type | String | Body | 能力类型,见 标准物模型 |
| ability_attribute | []String | Body | 能力所含附加属性,见 标准物模型 |
| state | String | Body | 状态,见 标准物模型 |
| attribute | Object | Body | 附加属性,见 标准物模型 |
space说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| space_id | String | Body | 空间ID |
| space_name | String | Body | 空间名称 |
| parent_space_id | String | Body | 父空间ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"show_ability": true,
"parallel_sub_device": false
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_name": "My Device",
"product_name": "HyPanel",
"device_type": "PS51",
"device_picture_url": "https://test.akubela.com/g.png",
"online": true,
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1",
"ability_type": "light",
"ability_attribute": [
"brightness"
],
"state": "on",
"attribute": {
"brightness": 70
}
},
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cb",
"ability_name": "led2",
"ability_type": "light",
"ability_attribute": [],
"state": "off",
"attribute": {}
}
],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"sub_devices": [
{
"device_id": "d8b5a73f8dd84abaa94b1c288be49b0cf",
"device_name": "My Sub Device",
"product_name": "Motion Sensor",
"device_type": "Motion Sensor",
"device_picture_url": "https://test.akubela.com/o.png",
"abilities": [],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"online": true,
"parent_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
],
"parent_device_id": ""
}
]
}
失败返回示例
见 接口失败返回
获取设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| product_name | String | Body | 产品名称 |
| device_type | String | Body | 设备类型 |
| device_picture_url | String | Body | 设备图片地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| abilities | []Object<ability> | Body | 能力信息 |
| space | Object<space> | Body | 空间信息 |
| sub_devices | []Object<result> | Body | 子设备信息 |
ability说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| ability_id | String | Body | 能力ID |
| ability_name | String | Body | 能力名称 |
| ability_type | String | Body | 能力类型,见 标准物模型 |
| ability_attribute | []String | Body | 能力所含附加属性,见 标准物模型 |
| state | String | Body | 状态,见 标准物模型 |
| attribute | Object | Body | 附加属性,见 标准物模型 |
space说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| space_id | String | Body | 空间ID |
| space_name | String | Body | 空间名称 |
| parent_space_id | String | Body | 父空间ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_name": "My Device",
"product_name": "HyPanel",
"device_type": "PS51",
"device_picture_url": "https://test.akubela.com/g.png",
"online": true,
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1",
"ability_type": "light",
"ability_attribute": [
"brightness"
],
"state": "on",
"attribute": {
"brightness": 70
}
},
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cb",
"ability_name": "led2",
"ability_type": "light",
"ability_attribute": [],
"state": "off",
"attribute": {}
}
],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"sub_devices": [
{
"device_id": "d8b5a73f8dd84abaa94b1c288be49b0cf",
"device_name": "My Sub Device",
"product_name": "Motion Sensor",
"device_type": "Motion Sensor",
"device_picture_url": "https://test.akubela.com/o.png",
"abilities": [],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"online": true
}
]
}
]
}
失败返回示例
见 接口失败返回
控制设备
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
| control | String | Body | 是 | 能力控制,见 标准物模型 |
| attribute | Object | Body | 否 | 附加属性,见 标准物模型 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "control_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"ability_id": "e8b5a73f8dd84abaa94dcs288be49b4ce",
"control": "turn_on",
"attribute": {
"brightness": 70
}
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量控制设备
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| devices | []Object<device> | Body | 是 | 设备信息 |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
| control | String | Body | 是 | 能力控制,见 标准物模型 |
| attribute | Object | Body | 否 | 附加属性,见 标准物模型 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_control_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"devices": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"ability_id": "e8b5a73f8dd84abaa94dcs288be49b4ce",
"control": "turn_on",
"attribute": {
"brightness": 70
}
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量控制设备组
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| spaces | []Object<space> | Body | 是 | 空间信息 |
| devices | []Object<device> | Body | 是 | 设备信息 |
space说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| space_id | String | Body | 是 | 空间ID |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| ability_type | String | Body | 是 | 能力类型,见 标准物模型 |
| control | String | Body | 是 | 能力控制,见 标准物模型 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_control_device_group",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"spaces": [
{
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0d2"
}
],
"devices": [
{
"ability_type": "light",
"control": "turn_on"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
开启设备扫描
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| gateway_device_id | String | Body | 是 | 网关设备ID |
| device_type | String | Body | 否 | 设备类型 |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_on_scanning_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"gateway_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_type": "light",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
关闭设备扫描
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| gateway_device_id | String | Body | 是 | 网关设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_off_scanning_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"gateway_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
更新设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| space_id | String | Body | 是 | 空间ID |
| device_name | String | Body | 是 | 设备名称 |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_name": "test_device_name",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3cbca664f4a10a0ce95452be1b67ca58",
"space_id": "rc3c6e408413be7fdc3e60f34f0950d6b"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量更新设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| devices | []Object<device> | Body | 是 | 设备信息 |
| residence_id | String | Body | 是 | 住宅ID |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| space_id | String | Body | 是 | 空间ID |
| device_name | String | Body | 是 | 设备名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_update_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "d2ab24943ba75edc0a77211e5084f95e0",
"space_id": "rcf986cb4c00d4a031a56a51a81e430d5",
"device_name": "test_device_name"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
更新设备能力信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
| ability_name | String | Body | 是 | 能力名称 |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_device_ability_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"ability_name": "test_name",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3cbca664f4a10a0ce95452be1b67ca58",
"ability_id": "ac3c6e408413be7fdc3e60f34f0950d6b"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量更新设备能力信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| devices | []Object<device> | Body | 是 | 设备信息 |
| residence_id | String | Body | 是 | 住宅ID |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
| ability_name | String | Body | 是 | 能力名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_update_device_ability_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "d2ab24943ba75edc0a77211e5084f95e0",
"ability_id": "acf986cb4c00d4a031a56a51a81e430d5",
"ability_name": "test_name"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| devices | []Object<device> | Body | 是 | 设备信息 |
| residence_id | String | Body | 是 | 住宅ID |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "dfdae91916dc3547beabd353b2dad7a42"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取ZigBee设备类型列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| zigbee_device_type | []String | Body | ZigBee设备类型 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_zigbee_device_type_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"zigbee_device_type": []
}
}
失败返回示例
见 接口失败返回
创建ZigBee设备信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| gateway_device_id | String | Body | 是 | 网关设备ID |
| zigbee_device_type | String | Body | 是 | ZigBee设备类型 |
| residence_id | String | Body | 是 | 住宅ID |
| mac | String | Body | 是 | MAC地址 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| multi_channel_devices | []Object<multi_channel_device> | Body | 多路设备信息 |
multi_channel_device说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_zigbee_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"gateway_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"zigbee_device_type": "light",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"mac": "C34568542456"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0c3",
"multi_channel_devices": [],
"online": true
}
}
失败返回示例
见 接口失败返回
获取红外遥控器列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| infrared_remote_controller_type | String | Body | 是 | 红外遥控器类型 AC Remote:空调 TV Remote:电视 |
| residence_id | String | Body | 是 | 住宅ID |
| infrared_remote_controller_brand_id | String | Body | 是 | 红外遥控器品牌ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| infrared_remote_controllers | []Object<infrared_remote_controller> | Body | 红外遥控器信息 |
infrared_remote_controller说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| infrared_remote_controller_id | String | Body | 红外遥控器ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_infrared_remote_controller_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"infrared_remote_controller_brand_id": "0"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"infrared_remote_controllers": [
{
"infrared_remote_controller_id": "0"
}
]
}
}
失败返回示例
见 接口失败返回
获取红外遥控器品牌列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| infrared_remote_controller_type | String | Body | 是 | 红外遥控器类型 AC Remote:空调 TV Remote:电视 |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| infrared_remote_controller_brands | []Object<infrared_remote_controller_brand> | Body | 红外遥控器品牌信息 |
infrared_remote_controller_brand说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| infrared_remote_controller_brand_id | String | Body | 红外遥控器品牌ID |
| infrared_remote_controller_brand_name | String | Body | 红外遥控器品牌名称 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_infrared_remote_controller_brand_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"infrared_remote_controller_brands": [
{
"infrared_remote_controller_brand_name": "midea",
"infrared_remote_controller_brand_id": "0"
}
]
}
}
失败返回示例
见 接口失败返回
创建红外遥控器信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| infrared_remote_controller_matching | Boolean | Body | 是 | 判断红外遥控器匹配是否成功 true:成功 false:失败 |
| infrared_remote_controller_type | String | Body | 是 | 红外遥控器类型 AC Remote:空调 TV Remote:电视 |
| residence_id | String | Body | 是 | 住宅ID |
| infrared_remote_controller_id | String | Body | 是 | 红外遥控器ID |
| parent_device_id | String | Body | 是 | 父设备ID |
| infrared_remote_controller_brand_id | String | Body | 是 | 红外遥控器品牌ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_infrared_remote_controller_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_matching": true,
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"parent_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"infrared_remote_controller_brand_id": "0",
"infrared_remote_controller_id": "0"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
}
失败返回示例
见 接口失败返回
红外遥控器匹配
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| infrared_remote_controller_function_key | String | Body | 否 | 红外遥控器功能按键 |
| infrared_remote_controller_type | String | Body | 是 | 红外遥控器类型 AC Remote:空调 TV Remote:电视 |
| residence_id | String | Body | 是 | 住宅ID |
| infrared_remote_controller_id | String | Body | 是 | 红外遥控器ID |
| device_id | String | Body | 是 | 设备ID |
| infrared_remote_controller_brand_id | String | Body | 是 | 红外遥控器品牌ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "infrared_remote_controller_matching",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"infrared_remote_controller_brand_id": "0",
"infrared_remote_controller_id": "0"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取灯光控制群组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_name | String | Body | 设备名称 |
| space_id | String | Body | 空间ID |
| control_group | Object<control_group> | Body | 控制群组 |
control_group说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| low_brightness_level_groups | []Object<brightness_level_group> | Body | 低亮度群组信息 |
| medium_brightness_level_groups | []Object<brightness_level_group> | Body | 中亮度群组信息 |
| high_brightness_level_groups | []Object<brightness_level_group> | Body | 高亮度群组信息 |
brightness_level_group说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| ability_id | String | Body | 能力ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d11adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}
失败返回示例
见 接口失败返回
获取可组群控制灯光列表
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| space_id | String | Body | 空间ID |
| space_name | String | Body | 空间名称 |
| abilities | []Object<ability> | Body | 能力信息 |
ability说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| ability_id | String | Body | 能力ID |
| ability_name | String | Body | 能力名称 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_groupable_control_light_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "dafa332e258aae1badbb27d31128f442d",
"device_name": "test_device",
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0db",
"space_name": "my room",
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1"
}
]
}
]
}
失败返回示例
见 接口失败返回
创建灯光控制群组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_name | String | Body | 是 | 设备名称 |
| space_id | String | Body | 是 | 空间ID |
| control_group | Object<control_group> | Body | 是 | 控制群组 |
control_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| low_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 低亮度群组信息 |
| medium_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 中亮度群组信息 |
| high_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 高亮度群组信息 |
brightness_level_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs248be49b0d1"
}
}
失败返回示例
见 接口失败返回
更新灯光控制群组信息
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| device_name | String | Body | 是 | 设备名称 |
| space_id | String | Body | 是 | 空间ID |
| control_group | Object<control_group> | Body | 是 | 控制群组 |
control_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| low_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 低亮度群组信息 |
| medium_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 中亮度群组信息 |
| high_brightness_level_groups | []Object<brightness_level_group> | Body | 是 | 高亮度群组信息 |
brightness_level_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| ability_id | String | Body | 是 | 能力ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dafa332e258aae1badbb27d31128f5521",
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁基础配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| language | String | Body | 语言 |
| supported_language | []String | Body | 已支持语言 |
| volume | String | Body | 音量 high:高 medium:中 low:低 mute:静音 |
| dwell_alarm | Boolean | Body | 判断是否启用驻留警报 true:启用 false:禁用 |
| dwell_time | Integer | Body | 驻留时长,取值:15/20/25,单位:秒 |
| monitoring_scope | String | Body | 监控范围 large:大 small:小 |
| double_verification | Boolean | Body | 判断是否启用双重认证 true:启用 false:禁用 |
| wifi_ssid | String | Body | WiFi名称 |
| wifi_ip | String | Body | WiFi IP |
| wifi_gateway | String | Body | WiFi网关 |
| wifi_rssi | Integer | Body | WiFi信号强度 |
| lock_version | String | Body | 锁版本 |
| rtsp_url | String | Body | RTSP地址 |
| support_audio_intercom | Boolean | Body | 音频对讲功能支持 true: 支持 false: 不支持 |
| ciphertext | String | Body | 密文,依赖SDK解析 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_basic_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"language": "en",
"supported_language": [
"zh",
"en"
],
"volume": "high",
"dwell_alarm": true,
"dwell_time": 20,
"monitoring_scope": "large",
"double_verification": true,
"wifi_ssid": "akubela",
"wifi_ip": "192.168.19.190",
"wifi_gateway": "192.168.19.1",
"wifi_rssi": -30,
"rtsp_url": "rtsp://192.168.19.32",
"support_audio_intercom": true,
"ciphertext": "7b3d75f5a8cfa959167852468fca08a1",
"lock_version": ""
}
}
失败返回示例
见 接口失败返回
更新锁基础配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
| language | String | Body | 否 | 语言 |
| volume | String | Body | 否 | 音量 high:高 medium:中 low:低 mute:静音 |
| dwell_alarm | Boolean | Body | 否 | 判断是否启用驻留警报 true:启用 false:禁用 |
| dwell_time | Integer | Body | 否 | 驻留时长,取值:15/20/25,单位:秒 |
| monitoring_scope | String | Body | 否 | 监控范围 large:大 small:小 |
| double_verification | Boolean | Body | 否 | 判断是否启用双重认证 true:启用 false:禁用 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_basic_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"language": "en",
"volume": "high",
"dwell_alarm": true,
"dwell_time": 20,
"monitoring_scope": "large",
"double_verification": true
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁临时密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
| key_name | String | Body | 密码名称 |
| temp_key | String | Body | 临时密码 |
| repeat_mode | String | Body | 重复模式 never:从不 weekly:每周 |
| available_days | []String | Body | 可用时间 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test",
"repeat_mode": "never",
"available_days": [],
"start_time": "2024-03-15 12:32:43",
"finish_time": "2024-03-15 17:32:43",
"temp_key": "01234567"
}
]
}
失败返回示例
见 接口失败返回
创建锁临时密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_name | String | Body | 是 | 密码名称 |
| temp_key | String | Body | 是 | 临时密码 |
| repeat_mode | String | Body | 是 | 重复模式 never:从不 weekly:每周 |
| available_days | []String | Body | 否 | 可用时间 |
| start_time | String | Body | 是 | 开始时间,UTC |
| finish_time | String | Body | 是 | 结束时间,UTC |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_name": "test",
"temp_key": "01234567",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "12:32:43",
"finish_time": "17:32:43",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
失败返回示例
见 接口失败返回
删除锁临时密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除锁临时密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密码信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
key说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
| key_name | String | Body | 密码名称 |
| open_door_key | String | Body | 开门密码 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test",
"open_door_key": "123456"
}
]
}
失败返回示例
见 接口失败返回
创建锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_name | String | Body | 否 | 密码名称 |
| open_door_key | String | Body | 是 | 开门密码 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"open_door_key": "123456",
"key_name": "test",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
失败返回示例
见 接口失败返回
更新锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_id | String | Body | 是 | 密码ID |
| key_name | String | Body | 是 | 密码名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除锁开门密码配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密码信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
key说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
| key_name | String | Body | 密码名称 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test"
}
]
}
失败返回示例
见 接口失败返回
更新锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_id | String | Body | 是 | 密码ID |
| key_name | String | Body | 是 | 密码名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密码信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
key说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
开启锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_on_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
关闭锁指纹配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_off_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| key_id | String | Body | 密码ID |
| key_name | String | Body | 密码名称 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test"
}
]
}
失败返回示例
见 接口失败返回
更新锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| key_id | String | Body | 是 | 密码ID |
| key_name | String | Body | 是 | 密码名称 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| keys | []Object<key> | Body | 是 | 密码信息 |
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
key说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| key_id | String | Body | 是 | 密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
开启锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_on_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
关闭锁卡片配置
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "turn_off_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取锁历史记录
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| residence_id | String | Body | 是 | 住宅ID |
| device_id | String | Body | 是 | 设备ID |
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
| lock_record_type | String | Body | 否 | 锁记录类型 unlock:开锁 alarm:警报 doorbell:门铃 capture:抓拍 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| lock_record_id | String | Body | 锁记录ID |
| lock_record_type | String | Body | 锁记录类型 unlock:开锁 alarm:警报 doorbell:门铃 capture:抓拍 |
| capture_picture_url | String | Body | 抓拍图地址 |
| lock_time | String | Body | 锁时间,UTC |
| note | String | Body | 记录 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_lock_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"device_id": "d1b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"lock_record_id": "r1b5a73f8dd84abaa94dcs248be49b0d1",
"lock_type": "unlock",
"capture_picture_url": "",
"lock_time": "2025-02-16 13:32:43",
"note": ""
}
]
}
失败返回示例
见 接口失败返回
锁唤醒
接口地址
POST /api/v1.0/invoke/open-ability/method/user-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| device_id | String | Body | 是 | 设备ID |
| residence_id | String | Body | 是 | 住宅ID |
| wakeup_mode | String | Body | 否 | 唤醒模式 sip:SIP(默认) bluetooth:蓝牙 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "lock_wakeup",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回